﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageView.aspx.cs" Inherits="CustomControlPractice.MVP.PageView" %>
<%@ Import Namespace="CustomControlPractice.MVP"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>

<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList ID="searchType" runat="server">
            <asp:ListItem>ByUnicard</asp:ListItem>
            <asp:ListItem>ByName</asp:ListItem>
        </asp:DropDownList>
        <asp:textbox ID="searchContent" runat="server"></asp:textbox>
        <asp:button ID="searchButton" runat="server" text="Search" OnClick="OnSearchButtonClick" />
    </div>
    <div>
        <asp:GridView ID="gridView" runat="server" Width="634px" AllowSorting="True" 
            onsorting="OnGridViewSorting" AutoGenerateColumns="false">
            <Columns>
                <asp:BoundField DataField="PatientName" HeaderText="Patient Name" SortExpression="PatientName"/>
                <asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender"/>
                <asp:BoundField DataField="Age" HeaderText="Age" SortExpression="Age"/>
                <asp:TemplateField HeaderText="Hospital Name" SortExpression="TargetHospital">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# ((Hospital)Eval("TargetHospital")).Name %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
</body>
</html>
